﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="orderCardList.aspx.cs" Inherits="WebSite.admin.order.orderCardList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head2" runat="server">
    <title>卡券订单列表</title>
    <link href="../css/skin.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../js/main.js"></script>
    <script type="text/javascript" src="../js/jquery.min.js"></script>
    <script type="text/javascript" src="../js/jquery.js"></script>
    <script language="javascript" type="text/javascript" src="/My97DatePicker/WdatePicker.js" charset="utf-8"></script>
</head>

<body class="body">
    <table class="main" cellpadding="0" cellspacing="0">
        <tr>
            <td class="td_middle_middle">
                <div class="maincontent">
                   
                  <input id="btnAddOrderCard" type="button" style='display:<%=AddDisplay %>; float:left;' class="formButton2" value="卡券订单添加" onclick="location.href='orderCardAdd.aspx?ot=ad';" />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                    <label>
                        查找：</label>
                    <select id="selectOrder" name="t">
                        <option value="ordercode" selected="selected">订单号</option>
                        <option value="cname1">收件人</option>
                        <option value="goodsname">商品名称</option>
                    </select>
                    <input id="txtKeyWord" type="text" value="<%=kw %>" />
                     <select name="selectStates" id="selectStates" >
                        <option selected="selected" value="0">新订单</option>
                        <option value="1">备货中</option>
                        <option value="2">已发货</option>
                        <option value="3">已完成</option>
                     </select>
                     <select name="selectCardType" id="selectCardType">
                        <option selected="selected" value="">所有卡券类型</option>
                       <%= SelectCardType.ToString() %>
                     </select>
                       <select name="selectCardPublishCompnay" id="selectCardPublishCompnay">
                       <option selected="selected" value="">所有发行商</option>
                       <%= SelectCardPublishCompnay.ToString() %>
                     </select>
                    <br />
                    &nbsp;&nbsp;送货日期从：<input id="txtStartDate"  name="txtStartDate" type="text" onfocus="new WdatePicker(this,'%Y-%M-%D',true,'default')"
                        onpaste="return false" style="ime-mode: disabled"  />&nbsp;&nbsp;至：<input
                            id="txtEndDate" name="txtEndDate" type="text" onfocus="new WdatePicker(this,'%Y-%M-%D',true,'default')"
                            onpaste="return false" style="ime-mode: disabled"  />
                    <input id="btnSearch" type="button" class="formButton" value="搜  索" onclick="keywordOrderCardSearch('orderCardList.aspx');" />

                    <label>
                        每页显示：</label>
                    <select id="selectPageSize" name="ps" onchange="SetPageSize();">
                        <option value="10">10</option>
                        <option value="20" selected="selected">20</option>
                        <option value="50">50</option>
                        <option value="100">100</option>
                    </select>
                       <form id="form2" runat="server">
                    <asp:Button ID="btnExport" runat="server" Text="导出Excel" EnableViewState="false"
                            CssClass="formButton" OnClick="btnExport_Click" />
    
                        <table cellpadding="0" cellspacing="0">
                            <tr class="tr_title">
                                <td>
                                    <input name="chkall" value="1" type="checkbox" onclick="CheckAllCardOrder(this,'Item')"
                                        title="全选/反选" />
                                </td>
                                <td>
                                    <span onclick="SetOrder('orderCode');">订单号</span></td>
                                 <td>
                                    <span onclick="SetOrder('cname1');">收件人</span></td>
                                <td>
                                    <span>联系方式</span></td>
                                <td>
                                    <span onclick="SetOrder('payName');">付款方式</span></td>
                                <td>
                                    <span onclick="SetOrder('sumprice');">订单金额</span></td>
                                 <td>
                                    <span onclick="SetOrder('ordertime');">下单时间</span></td>
                                <td>
                                    <span onclick="SetOrder('senddate');">送货时间</span></td>
                                <td>
                                    <span onclick="SetOrder('states');">订单状态</span></td>
                                <td>
                                    <span onclick="SetOrder('SendCompany');">物流公司</span></td>
                                <td>
                                    <span onclick="SetOrder('SendCode');">物流单号</span></td>
                                <td>
                                    操作</td>
                            </tr>
                            <asp:Repeater ID="rptOrder" runat="server" OnItemDataBound="rptOrder_ItemDataBound">
                                <ItemTemplate>
                                    <tbody>
                                        <tr>
                                            <td>
                                                <input id='cb<%# Eval("orderid") %>' name="Item" type="checkbox" onclick="ShowOrderStatesModify();"
                                                    value='<%# Eval("orderid") %>' /></td>
                                            <td>
                                                 <a title="查看" href="orders.aspx?oid=<%# Eval("orderid") %>&flag=1&otype=16"><%# Eval("orderid") %></a> 
                                            </td>
                                                <td>
                                                <%# Eval("cname1")%>
                                            </td>
                                               
                                            <td>
                                               <%# Eval("tel1") + "&nbsp;&nbsp;" + Eval("phone1") %>
                                            </td>
                                             <td>
                                                <%# Eval("payName")%>
                                            </td>
                                            <td>
                                                <%# String.Format("{0:C}", Eval("sumprice"))%>
                                            </td>
                                            <td>
                                                <%# Eval("ordertime")%>
                                            </td>
                                            <td>
                                                <%# Eval("senddate")%>
                                            </td>
                                            <td>
                                                <%# Eval("states").ToString() == "0" ? "新订单" : Eval("states").ToString() == "1" ? "备货中" : Eval("states").ToString() == "2" ? "已发货" : "已完成"%>
                                            </td>
                                            <td>
                                                <%# Eval("SendCompany")%>
                                            </td>
                                   
                                            <td>
                                                <%# Eval("SendCode")%>
                                            </td>
                                            <td>
                                             <div style="float:left; display:block;" id="divEdit" runat="server">  <a href="orders.aspx?oid=<%# Eval("orderid") %>&otype=15&flag=1"  title="编辑">[编辑]</a></div>
                                            </td>
                                        </tr>
                                    </tbody>
                                </ItemTemplate>
                                <FooterTemplate>
                                    <tr>
                                        <td colspan="12" style="text-align: center;">
                                            <label id="lblEmpty" style='display: <%# rptOrder.Items.Count==0?"block":"none"%>;
                                                color: Red;'>
                                                没有找到任何记录</label>
                                        </td>
                                    </tr>
                                </FooterTemplate>
                            </asp:Repeater>

                        </table>
                        <% Response.Write((new Gift.WebApp.PageListNo()).DisplayPage(total, pageSize, pageIndex)); %>
                        <table width="98%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td height="40" align="left" class="style1">
                              <select name="flag" id="flag" runat="server">
                                <option value="0">新订单</option>
                                <option value="1">备货中</option>
                                <option value="2">已发货</option>
                                <option value="3">已完成</option>
                              </select>
   
                             <asp:Button ID="btnUpdateStates" runat="server" Text="更新状态" OnClientClick="return confirm('确定要更新选中订单的状态吗？');"  OnClick="btnUpdateStates_Click" EnableViewState="false" CssClass="formButton" />
                               </td>
                              </tr>
                            <tr>
                              <td height="40" align="left" class="style2">
                                  <asp:FileUpload ID="FileUpload1" runat="server" Width="260px" />

                                   <asp:ImageButton ID="ibtnInport" ImageUrl="../images/btnInport.gif" runat="server" OnClick="ibtnInport_Click" />  
                               </td>
                              </tr>
                          </table>

                    </form>
                  
                </div>
            </td>

        </tr>

    </table>
</body>
</html>


